<{include file="top.html"}>
<link rel="stylesheet" type="text/css" href="<{$preStaticUrl}>Wap/css/editors.css"/>
</head>
<body>
<div class="evaluation">
    <div class="section">
        <label class="ui-label">服务态度</label>
            <span class="star_bg">
                <input type="radio" id="zp1" class="score score_1" value="1" name="score" <{if $data.attitudeScore == 1}>checked<{/if}>>
                <label for="zp1" class="star star_1" title="差"></label>
                <input type="radio" id="zp2" class="score score_2" value="2" name="score" <{if $data.attitudeScore == 2}>checked<{/if}>>
                <label for="zp2" class="star star_2" title="较差"></label>
                <input type="radio" id="zp3" class="score score_3" value="3" name="score" <{if $data.attitudeScore == 3}>checked<{/if}>>
                <label for="zp3" class="star star_3" title="普通"></label>
                <input type="radio" id="zp4" class="score score_4" value="4" name="score" <{if $data.attitudeScore == 4}>checked<{/if}>>
                <label for="zp4" class="star star_4" title="较好"></label>
                <input type="radio" id="zp5" class="score score_5" value="5" name="score" <{if $data.attitudeScore == 5}>checked<{/if}>>
                <label for="zp5" class="star star_5" title="好"></label>
            </span>
    </div>

    <div class="section">
        <label class="ui-label">服务速度</label>
            <span class="star_bg">
                <input type="radio" id="hj1" class="score score_1" value="1" name="hj" <{if $data.speedScore == 1}>checked<{/if}>>
                <label for="hj1" class="star star_1" title="差"></label>
                <input type="radio" id="hj2" class="score score_2" value="2" name="hj" <{if $data.speedScore == 2}>checked<{/if}>>
                <label for="hj2" class="star star_2" title="较差"></label>
                <input type="radio" id="hj3" class="score score_3" value="3" name="hj" <{if $data.speedScore == 3}>checked<{/if}>>
                <label for="hj3" class="star star_3" title="普通"></label>
                <input type="radio" id="hj4" class="score score_4" value="4" name="hj" <{if $data.speedScore == 4}>checked<{/if}>>
                <label for="hj4" class="star star_4" title="较好"></label>
                <input type="radio" id="hj5" class="score score_5" value="5" name="hj" <{if $data.speedScore == 5}>checked<{/if}>>
                <label for="hj5" class="star star_5" title="好"></label>
            </span>
    </div>

    <div class="section">
        <label class="ui-label">门店环境</label>
            <span class="star_bg">
                <input type="radio" id="service1" class="score score_1" value="1" name="service" <{if $data.environmentScore == 1}>checked<{/if}>>
                <label for="service1" class="star star_1" title="差"></label>
                <input type="radio" id="service2" class="score score_2" value="2" name="service" <{if $data.environmentScore == 2}>checked<{/if}>>
                <label for="service2" class="star star_2" title="较差"></label>
                <input type="radio" id="service3" class="score score_3" value="3" name="service" <{if $data.environmentScore == 3}>checked<{/if}>>
                <label for="service3" class="star star_3" title="普通"></label>
                <input type="radio" id="service4" class="score score_4" value="4" name="service" <{if $data.environmentScore == 4}>checked<{/if}>>
                <label for="service4" class="star star_4" title="较好"></label>
                <input type="radio" id="service5" class="score score_5" value="5" name="service" <{if $data.environmentScore == 5}>checked<{/if}>>
                <label for="service5" class="star star_5" title="好"></label>
            </span>
    </div>
</div>

<div class="msg">
    <textarea name="content" id="content" rows="" cols="" placeholder="对本次服务还满意么，或者是写写对我们的建议"><{$data.content}></textarea>
</div>

<div class="ui-button ui-button-2">
    <a href="javascript:void(0)" onclick="doEvaluate()">完成评价</a>
</div>
</body>
</html>
<script>
    var url = " <{U('Editor/addEvaluate')}>";
    var attitude = 0;
    var speed = 0;
    var environment =0;
    function doEvaluate(){
        var content = $('#content').val();
        attitude = $("input[name='score']:checked").val();
        speed = $("input[name='hj']:checked").val();
        environment = $("input[name='service']:checked").val();
        var id = "<{$data.id}>";
        var param = {id:id,score:attitude,hj:speed,service:environment,content:content};
        $.getJSON(url,param,function(data){
            if(data.status > 0){
                layer.msg(data.msg);
            } else{
                layer.msg("评价成功");
                window.history.go(-1);
            }
        });
    }

</script>